﻿using System;
using System.Collections.Generic;
using System.Text;
using BF.Model;
using BF.IDAL.Dictionary;
using BF.Infrastructure;
using System.Linq;

namespace BF.SQLServerDAL.Dictionary
{
    public class Dic_OrganizationDAL : DALBase<dic_Organization, WSJD_BaseFrameworkEntities>, Idic_OrganizationDAL
    {
        public Dic_OrganizationDAL(IDatabaseFactory<WSJD_BaseFrameworkEntities> databaseFactory)
            : base(databaseFactory)
        {
        }

        /// <summary>
        ///获取上级机构编码,仅限卫生室
        /// </summary>
        /// <returns></returns>
        public List<dic_Organization> GetHigherCode()
        {
            var query = (from c in DataContext.dic_Organization
                         where c.sOrganizationLevel=="1"
                         select c).ToList();
            return query;

        }
    }
}